﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AirLinq.Providers.Sql {
	public class SqlBetween : SqlPredicate {
		private readonly SqlExpression _test;
		private readonly SqlExpression _begin;
		private readonly SqlExpression _end;
		public SqlBetween(SqlExpression test, SqlExpression begin, SqlExpression end) {
			if (_test == null) {
				throw new ArgumentNullException("test");
			}
			if (begin == null) {
				throw new ArgumentNullException("begin");
			}
			if (end == null) {
				throw new ArgumentNullException("end");
			}
			_test = test;
			_begin = begin;
			_end = end;
		}
		public SqlExpression Test {
			get {
				return _test;
			}
		}
		public SqlExpression Begin {
			get {
				return _begin;
			}
		}
		public SqlExpression End {
			get {
				return _end;
			}
		}
		public override bool IsNotInjectionable {
			get {
				return true;
			}
		}
		public override SqlNodeType NodeType{
			get {
				return SqlNodeType.Between;
			}
		}
	}
}
